package com.hddf.project.dao;

import java.util.List;

import org.hibernate.Session;

import com.hddf.project.pojos.ProjectPlan;
import com.hddf.project.pojos.ProjectPlanItem;

public interface PlanDao {

	/**
	 * 根据计划ID查询
	 * 
	 * @param id
	 * @param s
	 * @return
	 * @throws Exception
	 */
	public List<ProjectPlanItem> getPlanItemByPlanId(int id, Session s) throws Exception;

	/**
	 * 获取所有计划
	 * 
	 * @return
	 * @throws Exception
	 */
	public List<ProjectPlan> getAllPlan(Session s) throws Exception;

	/**
	 * 根据计划名称和分页查询计划数据
	 * 
	 * @param s
	 * @return
	 * @throws Exception
	 */
	public List<ProjectPlan> getPlanListByNameAndPage(String name, String startTime, String endTime, int startPage,
			int lengthData, Session s) throws Exception;

	/**
	 * 根据计划名称和分页查询计划数据长度
	 * 
	 * @param s
	 * @return
	 * @throws Exception
	 */
	public int getPlansCountByNameAndPage(String name, String startTime, String endTime, Session s) throws Exception;

	/**
	 * 根据计划ID查询计划配置的数量
	 * 
	 * @param planId
	 * @return
	 * @throws Exception
	 */
	public int getCountPlanItemByPlanId(int planId, Session s) throws Exception;

	/**
	 * 根据项目ID查询配置
	 * 
	 * @param projectId
	 * @param s
	 * @return
	 * @throws Exception
	 */
	public List<ProjectPlanItem> getPlanItemByProjectId(int projectId, Session s) throws Exception;

	/**
	 * 根据项目ID和计划ID查询数量
	 * 
	 * @param projectId
	 * @param planId
	 * @param s
	 * @return
	 */
	public int countPlanItem(int projectId, int planId, Session s);

	/**
	 * 根据项目ID查询数量
	 * 
	 * @param projectId
	 * @param planId
	 * @param s
	 * @return
	 */
	public int countPlanItem(int projectId, Session s);

}